﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TestUserControl
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            serialPortFul1.SerialPortDataReceived += process;
            dd = new uu(cc);
        }

        private void serialPortFul1_Load(object sender, EventArgs e)
        {
            
        }

        private void process(object obj)
        {
           
            serialPortFul1.Invoke(dd,obj);
        }

        private delegate void uu(object obj);
        uu dd;

        private void cc(object a) { textBox1.Text = "dd"; }
    }
}
